package com.hckjsec.oa.domain;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hckjsec.common.annotation.Excel;
import com.hckjsec.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 公司OA申请对象 oa_apply
 * 
 * @author cyt
 * @date 2021-12-31
 */
public class OaApply extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 部门id */
    @Excel(name = "部门id")
    private Long deptId;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 用户姓名 */
    @Excel(name = "用户姓名")
    private String userName;

    /** 申请日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "申请日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date date;

    /** 申请类型 */
    @Excel(name = "申请类型")
    private String applyType;

    /** 开始时间 */
    @Excel(name = "开始时间")
    private String startDate;

    /** 结束时间 */
    @Excel(name = "结束时间")
    private String endDate;

    /** 时长 */
    @Excel(name = "时长")
    private Long duration;

    /** 事由 */
    @Excel(name = "事由")
    private String content;

    /** 状态 0 待审核,1 已审核 */
    @Excel(name = "状态 0 待审核,1 审核通过, 2 审核不通过")
    private String state;

    //加班时长字符串
    private String durationStr;

    private List<OaAuditing>  auditingList;
    //判断是否可以审批
    private boolean isAuditor;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setDeptId(Long deptId) 
    {
        this.deptId = deptId;
    }

    public Long getDeptId() 
    {
        return deptId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setUserName(String userName) 
    {
        this.userName = userName;
    }

    public String getUserName() 
    {
        return userName;
    }
    public void setDate(Date date) 
    {
        this.date = date;
    }

    public Date getDate() 
    {
        return date;
    }
    public void setApplyType(String applyType) 
    {
        this.applyType = applyType;
    }

    public String getApplyType() 
    {
        return applyType;
    }
    public void setStartDate(String startDate) 
    {
        this.startDate = startDate;
    }

    public String getStartDate() 
    {
        return startDate;
    }
    public void setEndDate(String endDate) 
    {
        this.endDate = endDate;
    }

    public String getEndDate() 
    {
        return endDate;
    }
    public void setDuration(Long duration) 
    {
        this.duration = duration;
    }

    public Long getDuration() 
    {
        return duration;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setState(String state) 
    {
        this.state = state;
    }

    public String getState() 
    {
        return state;
    }

    public String getDurationStr() {
        return durationStr;
    }

    public void setDurationStr(String durationStr) {
        this.durationStr = durationStr;
    }

    public List<OaAuditing> getAuditingList() {
        return auditingList;
    }

    public void setAuditingList(List<OaAuditing> auditingList) {
        this.auditingList = auditingList;
    }

    public boolean isAuditor() {
        return isAuditor;
    }

    public void setAuditor(boolean auditor) {
        this.isAuditor = auditor;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("deptId", getDeptId())
            .append("userId", getUserId())
            .append("userName", getUserName())
            .append("date", getDate())
            .append("applyType", getApplyType())
            .append("startDate", getStartDate())
            .append("endDate", getEndDate())
            .append("duration", getDuration())
            .append("content", getContent())
            .append("state", getState())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
